The stack unwinder can be called in interrupt context. On the other
hand xmalloc() can't be called in interrupt context.
Don't call xmalloc() if in the interrupt context.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
#endif
#ifdef XEN
-#define alloc_reg_state() xmalloc(struct unw_reg_state)
+#define alloc_reg_state() ({in_irq()? NULL: xmalloc(struct unw_reg_state);})
#define free_reg_state(usr) xfree(usr)
-#define alloc_labeled_state() xmalloc(struct unw_labeled_state)
+#define alloc_labeled_state() ({in_irq()? NULL: xmalloc(struct unw_labeled_state);})
#define free_labeled_state(usr) xfree(usr)
#else
#define alloc_reg_state() kmalloc(sizeof(struct unw_reg_state), GFP_ATOMIC)